package com.aidex.quartz.task;

import com.aidex.common.utils.NumberUtils;
import com.aidex.common.utils.StringUtils;
import com.aidex.system.service.VInternationalAsdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 定时处理实时运单数据
 *
 * @author jmy
 * @version 1.1
 * @date 2021-10-06 11:53
 */
@Component("historyWaybillHandleTask")
public class HistoryWaybillHandleTask {

    @Autowired
    private VInternationalAsdService vInternationalAsdService;

    /**
     * 执行定时任务
     * @param param
     */
    public void handleTask(String param) {
        Integer limit = 10;
        if (StringUtils.isNotBlank(param)) {
            limit = NumberUtils.toInt(param);
        }
        vInternationalAsdService.handleBatchWaybill(limit);
    }

}
